package ofc4j.model.elements;

import java.util.Arrays;
import java.util.List;

import ofc4j.model.metadata.Alias;

public class LineChart extends Element {
    private Integer width;
    @Alias("dot-size") private Integer dotSize;
    private String colour;
    
    public LineChart() {
        this(null);
    }
    
    protected LineChart(String type) {
        super("line" + (type != null ? "_" + type : ""));
    }

    public Integer getWidth() {
        return width;
    }

    public LineChart setWidth(Integer width) {
        this.width = width;
        return this;
    }

    public Integer getDotSize() {
        return dotSize;
    }

    public LineChart setDotSize(Integer dotSize) {
        this.dotSize = dotSize;
        return this;
    }

    public String getColour() {
        return colour;
    }

    public LineChart setColour(String colour) {
        this.colour = colour;
        return this;
    }
    
    public LineChart addValues(Number... values) {
        getValues().addAll(Arrays.asList(values));
        return this;
    }
    
    public LineChart addValues(List<Number> values) {
        getValues().addAll(values);
        return this;
    }
}
